<div>
    <div id="container4" style=""></div>
    <div id="container5" style=""></div>
    <div id="container3" style=""></div><!--积分周-->
    <div id="container2" style=""></div><!--积分月-->
    <div id="container1" style=""></div><!--积分年-->
<script>
    $(function (){
        Highcharts.setOptions({
            colors: ['#65CEA7','#24CBE5',  '#ED561B', '#50B432','#DDDF00',  '#64E572', '#FF9655', '#FFF263', '#6AF9C4']
        });
        <if condition = "$isadmin eq 1 and $poccess eq 1" >
            $('#container4').highcharts({
                //部门积分情况
                chart: {type: 'column', width: $('.active .col-sm-7.col-md-8.col-lg-9').width()},
                title: {text: '公司各部门积分情况'},
                xAxis: {
                    categories: <notempty name = 'dename'> {$dename} </notempty>,
                    crosshair:true
                },
                yAxis: {
                    min: 0, title:{text: '积分数量(分)'}
                },
                tooltip: {
                    shared :true,
                    useHTML:true
                },
                plotOptions: {
                    column: {pointPadding: 0.2, borderWidth:0, pointWidth:55},
                    series: {
                        dataLabels: {
                            enabled: true,
                            format: '{point.y}'
                        },
                        minPointLength: 3
                    }
                },
                series: [{
                    name: '积分',
                    data: {$devalue}
                }]
            });
            $('#container5').highcharts({
                //奖扣分情况
                chart: {type: 'column', width: $('.active .col-sm-7.col-md-8.col-lg-9').width()},
                title: {text: '奖扣分情况'},
                xAxis: {
                    categories: {$dname},
                    crosshair: true
                },
                yAxis: {min: 0, title: {text: '积分数量(分)'}},
                tooltip: {shared: true,useHTML: true},
                plotOptions: {
                    column: {pointPadding: 0.2, borderWidth: 0, maxpointWidth: 55},
                    series: {
                        minPointLength: 3
                    }
                },
                series: [{
                    name: '奖分',
                    data: {$addval},
                }, {
                    name: '扣分',
                    data: {$cutval},
                }]
            });
        </if>
        <if condition = "$isadmin eq 1 and $poccess eq 2" >
            $('#container4').highcharts({
                //奖扣分对比图
                chart: {
                    plotBackgroundColor: null,
                    plotBorderWidth: null,
                    plotShadow: false,
                    width: $('.active .col-sm-7.col-md-8.col-lg-9').width()
                },
                title: {
                    text: '奖扣分对比图'
                },
                tooltip: {
                    pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
                },
                plotOptions: {
                    pie: {
                        allowPointSelect: true,
                        cursor: 'pointer',
                        dataLabels: {
                            enabled: true,
                            format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                            style: {color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'}
                        }
                    }
                },
                series: [{
                    type: 'pie',
                    name: '所占比例',
                    data: {$record}
                }]
            });
            $('#container2').highcharts({
                chart: {
                    type: 'line',
                    width: $('.active .col-sm-7.col-md-8.col-lg-9').width()
                },
                title: {text: '月奖扣分详情图'},
                subtitle: {text: ''},
                xAxis: {
                    categories: {$awarddate},
                    labels: {rotation: -45, step: 1}
                },
                yAxis: {
                    title: {
                        text: '积分数量'
                    }
                },
                credits: {
                    enabled: false
                },
                plotOptions: {
                    series: {
                        dataLabels: {
                            enabled: true,
                            color: '#fff'
                        }
                    }
                },
                series: [{
                    name: '{$thisman}' + '奖分',
                    data: {$awardsum},
                }, {
                    name: '{$thisman}' + '扣分',
                    data: {$deductsum},
                }]
            });
            $('#container5').highcharts({
                //奖扣分情况
                chart: {type: 'column', width: $('.active .col-sm-7.col-md-8.col-lg-9').width()},
                title: {text: '已奖/应奖 已扣/应扣 对比图'},
                xAxis: {
                    categories: ['已奖','应奖','已扣','应扣'],
                    crosshair: true
                },
                yAxis: {min: 0, title: {text: '积分数量(分)'}},
                tooltip: {shared: true,useHTML: true},
                plotOptions: {
                    series: {
                        borderWidth: 0,
                        dataLabels: {
                            enabled: true,
                            format: '{point.y}'
                        },
                        minPointLength: 3
                    },
                    column: {pointPadding: 0.2, borderWidth: 0, pointWidth: 55}
                },
                series: [{
                    name: '{$manager}',
                    data: [{$award},{$awardinlaw},{$deduct},{$deductinlaw}],
                }]
            });
            $('#container3').highcharts({
                        //部门积分情况
                        chart: {type: 'column', width: $('.active .col-sm-7.col-md-8.col-lg-9').width()},
                        title: {text: '部门积分情况'},
                        xAxis: {
                            categories: <notempty name = 'depname'> {$depname} </notempty>,
                    crosshair:true},
                yAxis: {
                    min: 0, title:{text: '积分数量(分)'}
                },
                tooltip: {
                    shared: true,
                    useHTML:true
                },
                plotOptions: {
                    column: {pointPadding: 0.2, borderWidth:0, pointWidth:55},
                    series: {
                        borderWidth: 0,
                        dataLabels: {
                            enabled: true,
                            format: '{point.y}'
                        },
                        minPointLength: 3
                    },
                },
                series: [{
                    name: '积分',
                    data: {$depvalue}
                }]
            });
        </if>
        <if condition="$leader eq 1 and $poccess eq 4">
            $('#container4').highcharts({
                //奖扣分对比图
                chart: {
                    plotBackgroundColor: null,
                    plotBorderWidth: null,
                    plotShadow: false,
                    width: $('.active .col-sm-7.col-md-8.col-lg-9').width()
                },
                title: {
                    text: '奖扣分对比图'
                },
                tooltip: {
                    pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
                },
                plotOptions: {
                    pie: {
                        allowPointSelect: true,
                        cursor: 'pointer',
                        dataLabels: {
                            enabled: true,
                            format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                            style: {
                                color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                            }
                        }
                    }
                },
                series: [{
                    type: 'pie',
                    name: '已奖积分',
                    data: {$record}
                }]
            });
            $('#container2').highcharts({
                chart: {
                    type: 'line',
                    width: $('.active .col-sm-7.col-md-8.col-lg-9').width()
                },
                title: {text: '月奖扣分详情图'},
                subtitle: {text: ''},
                xAxis: {
                    categories: {$awarddate},
                    labels: {rotation: -45, step: 1}
                },
                yAxis: {
                    title: {
                        text: '积分数量'
                    }
                },
                credits: {
                    enabled: false
                },
                plotOptions: {
                    series: {
                        dataLabels: {
                            enabled: true,
                            color: '#fff'
                        }
                    }
                },
                series: [{
                    name: '{$thisman}' + '奖分',
                    data: {$awardsum},
                }, {
                    name: '{$thisman}' + '扣分',
                    data: {$deductsum},
                }]
            });
            $('#container3').highcharts({
                        //部门积分情况
                        chart: {type: 'column', width: $('.active .col-sm-7.col-md-8.col-lg-9').width()},
                        title: {text: '部门积分情况'},
                        xAxis: {
                            categories: <notempty name = 'depname'> {$depname} </notempty>,
                    crosshair:true},
                yAxis: {min: 0, title:{text: '积分数量(分)'}},
                tooltip: {shared: true,useHTML:true},
                plotOptions: {
                    column: {pointPadding: 0.2, borderWidth:0, pointWidth:55}
                },
                series: [{
                    name: '积分',
                    data: {$depvalue}
                }]
            });
        </if>
        <if condition="($isadmin eq 1 and $poccess eq 3) or ($leader eq 1 and $poccess eq 5 ) or $staff eq 1">
            $('#container1').highcharts({
                //积分年
                chart: {width: $('.active .col-sm-7.col-md-8.col-lg-9').width()},
                title: {
                    text: '{$yearly}'
                },
                xAxis: {
                    categories: {$yeardate}
                },
                yAxis: {title: {text: '积分数量 (分)'}},
                plotOptions: {column: {borderWidth: 0,pointWidth: 55,}},
                labels: {items: [{style: {left: '30px', top: '5px'}}]},
                series: [{
                    type: 'column',
                    name: '{$thisman}',
                    data: {$yeararr}
                }, {
                    type: 'pie', name: '所获积分',
                    data: {$yearform},
                    center: [80, 0],
                    colors: ['#24CBE5', '#ED561B', '#65CEA7', '#50B432','#DDDF00',  '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
                    size: 100,
                    showInLegend: false,//显示图例
                    dataLabels: {
                        enabled: false
                    }
                }]
            });
            $('#container2').highcharts({
                //月积分
                chart: {width: $('.active .col-sm-7.col-md-8.col-lg-9').width()},
                title: {
                    text: '{$monthly}'
                },
                xAxis: {
                    categories: {$monthdate}
                },
                yAxis: {title: {text: '积分数量 (分)'}},
                labels: {items: [{style: {left: '30px', top: '5px'}}]},
                series: [{
                    type: 'line',
                    name: '{$thisman}',
                    data: {$montharr}
                }, {
                    type: 'pie', name: '所获积分',
                    data: {$monthform},
                    center: [80, 0],
                    colors: ['#24CBE5', '#ED561B', '#65CEA7', '#50B432','#DDDF00',  '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
                    size: 100,
                    showInLegend: false,//显示图例
                    dataLabels: {enabled: false}
                }]
            });
            $('#container3').highcharts({
                //积分周
                chart: {width: $('.active .col-sm-7.col-md-8.col-lg-9').width()},
                title: {text: '个人积分情况（周）'},
                xAxis: {
                    categories: {$weekdate}
                },
                yAxis: {title: {text: '积分数量 (分)'}},
                plotOptions: {column: {borderWidth: 0,pointWidth: 55,}},
                labels: {items: [{style: {left: '30px', top: '5px'}}]},
                series: [{
                    type: 'column',
                    name: '{$thisman}',
                    data: {$weekarr}
                }]
            });
        </if>
    });
</script>
</div>